package com.douxg.learning.bigdata.kafka;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class KafkaProducer {
    @Resource
    private KafkaTemplate kafkaTemplate;

    public void sendLog(String msg) {
        kafkaTemplate.send("flow", msg);
        kafkaTemplate.send("flow", msg + "2");
        kafkaTemplate.send("flow", msg + "3");
    }
}
